package com.example.a2205douyin;

import android.os.Bundle;
import android.util.Log;

import androidx.appcompat.app.AppCompatActivity;

public class WelcomeActivity extends AppCompatActivity {

    private MyView myview;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);
        initView();
        //关键字屏蔽
        String str = "张三abc";
        if(str.contains("abc")){
            str = str.replace("abc","XXX");
        }
        Log.d("TAG", "start: "+str);
        myview.start(5);
    }

    private void initView() {
        myview = (MyView) findViewById(R.id.myview);
    }
}